; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o..\out\bsp_led.o --asm_dir=.\Lst\ --list_dir=.\Lst\ --depend=..\out\bsp_led.d --cpu=Cortex-M4.fp.sp --apcs=interwork -O0 --diag_suppress=9931 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -D__MICROLIB -D__UVISION_VERSION=536 -D_RTE_ -DSTM32F412Rx -D_RTE_ -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\out\bsp_led.crf ..\MOD\bsp_led.c]
                          THUMB

                          AREA ||i.bsp_InitLed||, CODE, READONLY, ALIGN=2

                  bsp_InitLed PROC
;;;51     */
;;;52     void bsp_InitLed(void)
000000  b508              PUSH     {r3,lr}
;;;53     {
;;;54     	GPIO_InitTypeDef GPIO_InitStructure;
;;;55     
;;;56     	/* GPIOʱ */
;;;57     	RCC_APB2PeriphClockCmd(RCC_ALL_LED, ENABLE);
000002  2101              MOVS     r1,#1
000004  2080              MOVS     r0,#0x80
000006  f7fffffe          BL       RCC_APB2PeriphClockCmd
;;;58     
;;;59     	/*
;;;60     		еLEDָʾGPIOΪģʽ
;;;61     		ڽGPIOΪʱGPIOĴֵȱʡ0˻LED.
;;;62     		ҲϣģڸıGPIOΪǰȹرLEDָʾ
;;;63     	*/
;;;64     	bsp_LedOff(1);
00000a  2001              MOVS     r0,#1
00000c  f7fffffe          BL       bsp_LedOff
;;;65     	bsp_LedOff(2);
000010  2002              MOVS     r0,#2
000012  f7fffffe          BL       bsp_LedOff
;;;66     	bsp_LedOff(3);
000016  2003              MOVS     r0,#3
000018  f7fffffe          BL       bsp_LedOff
;;;67     	bsp_LedOff(4);
00001c  2004              MOVS     r0,#4
00001e  f7fffffe          BL       bsp_LedOff
;;;68     
;;;69     	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
000022  2003              MOVS     r0,#3
000024  f88d0002          STRB     r0,[sp,#2]
;;;70     	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;	/* ģʽ */
000028  2010              MOVS     r0,#0x10
00002a  f88d0003          STRB     r0,[sp,#3]
;;;71     	
;;;72     	GPIO_InitStructure.GPIO_Pin = GPIO_PIN_LED1;
00002e  01c0              LSLS     r0,r0,#7
000030  f8ad0000          STRH     r0,[sp,#0]
;;;73     	GPIO_Init(GPIO_PORT_LED1, &GPIO_InitStructure);
000034  4669              MOV      r1,sp
000036  480d              LDR      r0,|L1.108|
000038  f7fffffe          BL       GPIO_Init
;;;74     
;;;75     	GPIO_InitStructure.GPIO_Pin = GPIO_PIN_LED2;
00003c  2080              MOVS     r0,#0x80
00003e  f8ad0000          STRH     r0,[sp,#0]
;;;76     	GPIO_Init(GPIO_PORT_LED2, &GPIO_InitStructure);
000042  4669              MOV      r1,sp
000044  4809              LDR      r0,|L1.108|
000046  f7fffffe          BL       GPIO_Init
;;;77     
;;;78     	GPIO_InitStructure.GPIO_Pin = GPIO_PIN_LED3;
00004a  f44f7080          MOV      r0,#0x100
00004e  f8ad0000          STRH     r0,[sp,#0]
;;;79     	GPIO_Init(GPIO_PORT_LED3, &GPIO_InitStructure);
000052  4669              MOV      r1,sp
000054  4805              LDR      r0,|L1.108|
000056  f7fffffe          BL       GPIO_Init
;;;80     
;;;81     	GPIO_InitStructure.GPIO_Pin = GPIO_PIN_LED4;
00005a  f44f7000          MOV      r0,#0x200
00005e  f8ad0000          STRH     r0,[sp,#0]
;;;82     	GPIO_Init(GPIO_PORT_LED4, &GPIO_InitStructure);
000062  4669              MOV      r1,sp
000064  4801              LDR      r0,|L1.108|
000066  f7fffffe          BL       GPIO_Init
;;;83     }
00006a  bd08              POP      {r3,pc}
;;;84     
                          ENDP

                  |L1.108|
                          DCD      0x40011c00

                          AREA ||i.bsp_IsLedOn||, CODE, READONLY, ALIGN=2

                  bsp_IsLedOn PROC
;;;180    */
;;;181    uint8_t bsp_IsLedOn(uint8_t _no)
000000  4601              MOV      r1,r0
;;;182    {
;;;183    	if (_no == 1)
000002  2901              CMP      r1,#1
000004  d108              BNE      |L2.24|
;;;184    	{
;;;185    		if ((GPIO_PORT_LED1->ODR & GPIO_PIN_LED1) == 0)
000006  4816              LDR      r0,|L2.96|
000008  6800              LDR      r0,[r0,#0]
00000a  f4006000          AND      r0,r0,#0x800
00000e  b908              CBNZ     r0,|L2.20|
;;;186    		{
;;;187    			return 1;
000010  2001              MOVS     r0,#1
                  |L2.18|
;;;188    		}
;;;189    		return 0;
;;;190    	}
;;;191    	else if (_no == 2)
;;;192    	{
;;;193    		if ((GPIO_PORT_LED2->ODR & GPIO_PIN_LED2) == 0)
;;;194    		{
;;;195    			return 1;
;;;196    		}
;;;197    		return 0;
;;;198    	}
;;;199    	else if (_no == 3)
;;;200    	{
;;;201    		if ((GPIO_PORT_LED3->ODR & GPIO_PIN_LED3) == 0)
;;;202    		{
;;;203    			return 1;
;;;204    		}
;;;205    		return 0;
;;;206    	}
;;;207    	else if (_no == 4)
;;;208    	{
;;;209    		if ((GPIO_PORT_LED4->ODR & GPIO_PIN_LED4) == 0)
;;;210    		{
;;;211    			return 1;
;;;212    		}
;;;213    		return 0;
;;;214    	}
;;;215    
;;;216    	return 0;
;;;217    }
000012  4770              BX       lr
                  |L2.20|
000014  2000              MOVS     r0,#0                 ;189
000016  e7fc              B        |L2.18|
                  |L2.24|
000018  2902              CMP      r1,#2                 ;191
00001a  d108              BNE      |L2.46|
00001c  4810              LDR      r0,|L2.96|
00001e  6800              LDR      r0,[r0,#0]            ;193
000020  f0000080          AND      r0,r0,#0x80           ;193
000024  b908              CBNZ     r0,|L2.42|
000026  2001              MOVS     r0,#1                 ;195
000028  e7f3              B        |L2.18|
                  |L2.42|
00002a  2000              MOVS     r0,#0                 ;197
00002c  e7f1              B        |L2.18|
                  |L2.46|
00002e  2903              CMP      r1,#3                 ;199
000030  d108              BNE      |L2.68|
000032  480b              LDR      r0,|L2.96|
000034  6800              LDR      r0,[r0,#0]            ;201
000036  f4007080          AND      r0,r0,#0x100          ;201
00003a  b908              CBNZ     r0,|L2.64|
00003c  2001              MOVS     r0,#1                 ;203
00003e  e7e8              B        |L2.18|
                  |L2.64|
000040  2000              MOVS     r0,#0                 ;205
000042  e7e6              B        |L2.18|
                  |L2.68|
000044  2904              CMP      r1,#4                 ;207
000046  d108              BNE      |L2.90|
000048  4805              LDR      r0,|L2.96|
00004a  6800              LDR      r0,[r0,#0]            ;209
00004c  f4007000          AND      r0,r0,#0x200          ;209
000050  b908              CBNZ     r0,|L2.86|
000052  2001              MOVS     r0,#1                 ;211
000054  e7dd              B        |L2.18|
                  |L2.86|
000056  2000              MOVS     r0,#0                 ;213
000058  e7db              B        |L2.18|
                  |L2.90|
00005a  2000              MOVS     r0,#0                 ;216
00005c  e7d9              B        |L2.18|
;;;218    
                          ENDP

00005e  0000              DCW      0x0000
                  |L2.96|
                          DCD      0x40011c0c

                          AREA ||i.bsp_LedOff||, CODE, READONLY, ALIGN=2

                  bsp_LedOff PROC
;;;122    */
;;;123    void bsp_LedOff(uint8_t _no)
000000  1e41              SUBS     r1,r0,#1
;;;124    {
;;;125    	_no--;
000002  b2c8              UXTB     r0,r1
;;;126    
;;;127    	if (_no == 0)
000004  b920              CBNZ     r0,|L3.16|
;;;128    	{
;;;129    		GPIO_PORT_LED1->BSRR = GPIO_PIN_LED1;
000006  f44f6100          MOV      r1,#0x800
00000a  4a0b              LDR      r2,|L3.56|
00000c  6011              STR      r1,[r2,#0]
00000e  e011              B        |L3.52|
                  |L3.16|
;;;130    	}
;;;131    	else if (_no == 1)
000010  2801              CMP      r0,#1
000012  d103              BNE      |L3.28|
;;;132    	{
;;;133    		GPIO_PORT_LED2->BSRR = GPIO_PIN_LED2;
000014  2180              MOVS     r1,#0x80
000016  4a08              LDR      r2,|L3.56|
000018  6011              STR      r1,[r2,#0]
00001a  e00b              B        |L3.52|
                  |L3.28|
;;;134    	}
;;;135    	else if (_no == 2)
00001c  2802              CMP      r0,#2
00001e  d103              BNE      |L3.40|
;;;136    	{
;;;137    		GPIO_PORT_LED3->BSRR = GPIO_PIN_LED3;
000020  01c1              LSLS     r1,r0,#7
000022  4a05              LDR      r2,|L3.56|
000024  6011              STR      r1,[r2,#0]
000026  e005              B        |L3.52|
                  |L3.40|
;;;138    	}
;;;139    	else if (_no == 3)
000028  2803              CMP      r0,#3
00002a  d103              BNE      |L3.52|
;;;140    	{
;;;141    		GPIO_PORT_LED4->BSRR = GPIO_PIN_LED4;
00002c  f44f7100          MOV      r1,#0x200
000030  4a01              LDR      r2,|L3.56|
000032  6011              STR      r1,[r2,#0]
                  |L3.52|
;;;142    	}
;;;143    }
000034  4770              BX       lr
;;;144    
                          ENDP

000036  0000              DCW      0x0000
                  |L3.56|
                          DCD      0x40011c10

                          AREA ||i.bsp_LedOn||, CODE, READONLY, ALIGN=2

                  bsp_LedOn PROC
;;;92     */
;;;93     void bsp_LedOn(uint8_t _no)
000000  1e41              SUBS     r1,r0,#1
;;;94     {
;;;95     	_no--;
000002  b2c8              UXTB     r0,r1
;;;96     
;;;97     	if (_no == 0)
000004  b920              CBNZ     r0,|L4.16|
;;;98     	{
;;;99     		GPIO_PORT_LED1->BRR = GPIO_PIN_LED1;
000006  f44f6100          MOV      r1,#0x800
00000a  4a0b              LDR      r2,|L4.56|
00000c  6011              STR      r1,[r2,#0]
00000e  e011              B        |L4.52|
                  |L4.16|
;;;100    	}
;;;101    	else if (_no == 1)
000010  2801              CMP      r0,#1
000012  d103              BNE      |L4.28|
;;;102    	{
;;;103    		GPIO_PORT_LED2->BRR = GPIO_PIN_LED2;
000014  2180              MOVS     r1,#0x80
000016  4a08              LDR      r2,|L4.56|
000018  6011              STR      r1,[r2,#0]
00001a  e00b              B        |L4.52|
                  |L4.28|
;;;104    	}
;;;105    	else if (_no == 2)
00001c  2802              CMP      r0,#2
00001e  d103              BNE      |L4.40|
;;;106    	{
;;;107    		GPIO_PORT_LED3->BRR = GPIO_PIN_LED3;
000020  01c1              LSLS     r1,r0,#7
000022  4a05              LDR      r2,|L4.56|
000024  6011              STR      r1,[r2,#0]
000026  e005              B        |L4.52|
                  |L4.40|
;;;108    	}
;;;109    	else if (_no == 3)
000028  2803              CMP      r0,#3
00002a  d103              BNE      |L4.52|
;;;110    	{
;;;111    		GPIO_PORT_LED4->BRR = GPIO_PIN_LED4;
00002c  f44f7100          MOV      r1,#0x200
000030  4a01              LDR      r2,|L4.56|
000032  6011              STR      r1,[r2,#0]
                  |L4.52|
;;;112    	}
;;;113    }
000034  4770              BX       lr
;;;114    
                          ENDP

000036  0000              DCW      0x0000
                  |L4.56|
                          DCD      0x40011c14

                          AREA ||i.bsp_LedToggle||, CODE, READONLY, ALIGN=2

                  bsp_LedToggle PROC
;;;152    */
;;;153    void bsp_LedToggle(uint8_t _no)
000000  2801              CMP      r0,#1
;;;154    {
;;;155    	if (_no == 1)
000002  d106              BNE      |L5.18|
;;;156    	{
;;;157    		GPIO_PORT_LED1->ODR ^= GPIO_PIN_LED1;
000004  4910              LDR      r1,|L5.72|
000006  6809              LDR      r1,[r1,#0]
000008  f4816100          EOR      r1,r1,#0x800
00000c  4a0e              LDR      r2,|L5.72|
00000e  6011              STR      r1,[r2,#0]
000010  e019              B        |L5.70|
                  |L5.18|
;;;158    	}
;;;159    	else if (_no == 2)
000012  2802              CMP      r0,#2
000014  d106              BNE      |L5.36|
;;;160    	{
;;;161    		GPIO_PORT_LED2->ODR ^= GPIO_PIN_LED2;
000016  490c              LDR      r1,|L5.72|
000018  6809              LDR      r1,[r1,#0]
00001a  f0810180          EOR      r1,r1,#0x80
00001e  4a0a              LDR      r2,|L5.72|
000020  6011              STR      r1,[r2,#0]
000022  e010              B        |L5.70|
                  |L5.36|
;;;162    	}
;;;163    	else if (_no == 3)
000024  2803              CMP      r0,#3
000026  d106              BNE      |L5.54|
;;;164    	{
;;;165    		GPIO_PORT_LED3->ODR ^= GPIO_PIN_LED3;
000028  4907              LDR      r1,|L5.72|
00002a  6809              LDR      r1,[r1,#0]
00002c  f4817180          EOR      r1,r1,#0x100
000030  4a05              LDR      r2,|L5.72|
000032  6011              STR      r1,[r2,#0]
000034  e007              B        |L5.70|
                  |L5.54|
;;;166    	}
;;;167    	else if (_no == 4)
000036  2804              CMP      r0,#4
000038  d105              BNE      |L5.70|
;;;168    	{
;;;169    		GPIO_PORT_LED4->ODR ^= GPIO_PIN_LED4;
00003a  4903              LDR      r1,|L5.72|
00003c  6809              LDR      r1,[r1,#0]
00003e  f4817100          EOR      r1,r1,#0x200
000042  4a01              LDR      r2,|L5.72|
000044  6011              STR      r1,[r2,#0]
                  |L5.70|
;;;170    	}
;;;171    }
000046  4770              BX       lr
;;;172    
                          ENDP

                  |L5.72|
                          DCD      0x40011c0c
